<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>记账日报</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
        }

        body {
            background: linear-gradient(135deg, #f5f7fa 0%, #e4eaf2 100%);
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 15px;
            color: #333;
        }

        .container {
            width: 100%;
            max-width: 1000px;
            background: white;
            border-radius: 16px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
            overflow: hidden;
            margin: 20px 0;
        }

        header {
            background: linear-gradient(120deg, #3498db, #2c3e50);
            color: white;
            padding: 28px 30px;
            text-align: center;
        }

        header h1 {
            font-size: 26px;
            font-weight: 700;
            margin-bottom: 8px;
        }

        header p {
            opacity: 0.85;
            font-size: 15px;
            font-weight: 300;
        }

        .date-display {
            background: #f8f9fa;
            padding: 14px 20px;
            text-align: center;
            font-size: 15px;
            color: #5a6a7e;
            border-bottom: 1px solid #eaedf0;
            font-weight: 500;
        }

        .stats-container {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 16px;
            padding: 25px;
        }

        .stat-card {
            background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
            border-radius: 14px;
            padding: 20px;
            box-shadow: 0 5px 12px rgba(0, 0, 0, 0.06);
            transition: all 0.3s ease;
            border: 1px solid #f0f2f5;
            display: flex;
            flex-direction: column;
            min-height: 140px;
        }

        .stat-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
        }

        .stat-header {
            display: flex;
            align-items: center;
            margin-bottom: 15px;
            color: #2c3e50;
        }

        .stat-icon {
            font-size: 20px;
            margin-right: 10px;
            width: 32px;
            height: 32px;
            border-radius: 10px;
            background: rgba(52, 152, 219, 0.1);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #3498db;
        }

        .stat-header h3 {
            font-size: 15px;
            font-weight: 600;
        }

        .stat-value {
            font-size: 26px;
            font-weight: 800;
            text-align: right;
            margin-top: auto;
        }

        .expense {
            color: #e74c3c;
        }

        .income {
            color: #27ae60;
        }

        .average {
            color: #f39c12;
        }

        .details-container {
            padding: 0 25px 25px;
        }

        .details-header {
            display: flex;
            align-items: center;
            margin-bottom: 18px;
            color: #2c3e50;
            font-weight: 600;
            font-size: 18px;
        }

        .details-icon {
            margin-right: 12px;
            color: #3498db;
            font-size: 20px;
        }

        .transaction-list {
            list-style: none;
        }

        .transaction-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px 18px;
            border-bottom: 1px solid #f0f2f5;
            transition: all 0.2s ease;
            border-radius: 10px;
            margin-bottom: 6px;
        }

        .transaction-item:hover {
            background: #f8fafd;
            transform: translateX(3px);
        }

        .transaction-info {
            display: flex;
            align-items: center;
            flex: 1;
        }

        .transaction-icon {
            width: 42px;
            height: 42px;
            border-radius: 12px;
            background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 15px;
            color: #3498db;
            font-size: 16px;
        }

        .transaction-details {
            flex: 1;
        }

        .transaction-name {
            font-weight: 600;
            font-size: 15px;
            margin-bottom: 4px;
        }

        .transaction-category {
            font-size: 12px;
            color: #6c757d;
            background: #f8f9fa;
            border-radius: 10px;
            display: inline-block;
        }

        .transaction-amount {
            font-weight: 700;
            font-size: 16px;
            padding: 6px 12px;
            border-radius: 10px;
            background: rgba(231, 76, 60, 0.08);
        }

        /* 响应式设计 */
        @media (max-width: 900px) {
            .stats-container {
                grid-template-columns: repeat(2, 1fr);
                gap: 14px;
                padding: 20px;
            }

            .stat-card {
                padding: 18px;
                min-height: 130px;
            }

            .stat-icon {
                font-size: 18px;
                width: 30px;
                height: 30px;
            }

            .stat-header h3 {
                font-size: 14px;
            }

            .stat-value {
                font-size: 24px;
            }
        }

        @media (max-width: 768px) {
            body {
                padding: 12px;
                display: block;
            }

            .container {
                margin: 10px auto;
                border-radius: 14px;
            }

            header {
                padding: 22px 20px;
            }

            header h1 {
                font-size: 22px;
            }

            .stats-container {
                grid-template-columns: repeat(2, 1fr);
                gap: 12px;
                padding: 18px;
            }

            .stat-card {
                padding: 16px;
                min-height: 120px;
            }

            .stat-header {
                margin-bottom: 12px;
            }

            .stat-icon {
                font-size: 16px;
                width: 28px;
                height: 28px;
                margin-right: 8px;
            }

            .stat-header h3 {
                font-size: 13px;
            }

            .stat-value {
                font-size: 22px;
            }

            .details-container {
                padding: 0 18px 18px;
            }

            .transaction-item {
                padding: 14px;
            }

            .transaction-icon {
                width: 38px;
                height: 38px;
                margin-right: 12px;
                font-size: 15px;
            }

            .transaction-name {
                font-size: 14px;
            }

            .transaction-amount {
                font-size: 15px;
                padding: 5px 10px;
            }
        }

        @media (max-width: 480px) {
            .stats-container {
                grid-template-columns: repeat(2, 1fr);
                gap: 10px;
                padding: 15px;
            }

            .stat-card {
                padding: 14px 12px;
                min-height: 110px;
                border-radius: 12px;
            }

            .stat-header {
                flex-direction: column;
                align-items: flex-start;
                margin-bottom: 10px;
            }

            .stat-icon {
                margin-bottom: 6px;
                margin-right: 0;
            }

            .stat-header h3 {
                font-size: 12px;
                line-height: 1.3;
            }

            .stat-value {
                font-size: 20px;
                text-align: center;
            }

            header h1 {
                font-size: 20px;
            }

            .date-display {
                padding: 12px 15px;
                font-size: 14px;
            }

            .details-header {
                font-size: 16px;
            }

            .transaction-item {
                flex-direction: column;
                align-items: flex-start;
                padding: 12px;
            }

            .transaction-info {
                width: 100%;
                margin-bottom: 10px;
            }

            .transaction-amount {
                align-self: flex-end;
                margin-top: 5px;
            }
        }

        @media (max-width: 360px) {
            .stats-container {
                grid-template-columns: 1fr;
            }

            .stat-header h3 {
                font-size: 13px;
            }

            .stat-value {
                font-size: 22px;
            }

            .stat-card {
                min-height: 100px;
                padding: 15px;
            }
        }

        /* 动画效果 */
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .stat-card {
            animation: fadeIn 0.5s ease-out;
        }

        .transaction-item {
            animation: fadeIn 0.4s ease-out;
        }

        .transaction-item:nth-child(1) { animation-delay: 0.1s; }
        .transaction-item:nth-child(2) { animation-delay: 0.2s; }
        .transaction-item:nth-child(3) { animation-delay: 0.3s; }

        /* 自定义图标样式 */
        .icon-pie::before { content: "📊"; }
        .icon-line::before { content: "📈"; }
        .icon-bill::before { content: "💰"; }
        .icon-coins::before { content: "💵"; }
        .icon-calendar::before { content: "📅"; }
        .icon-receipt::before { content: "🧾"; }
        .-icon-utensils::before { content: "🍹"; }

    </style>
</head>
<body>
<div class="container">
    <header>
        <h1>记账日报</h1>
        <p>清晰掌握您的收支情况</p>
    </header>

    <div class="date-display">
        <span id="current-date">%s</span>
    </div>

    <div class="stats-container">

        <div class="stat-card">
            <div class="stat-header">
                <div class="stat-icon icon-line"></div>
                <h3>本月收入</h3>
            </div>
            <div class="stat-value income">￥%s</div>
        </div>

        <div class="stat-card">
            <div class="stat-header">
                <div class="stat-icon icon-pie"></div>
                <h3>本月支出</h3>
            </div>
            <div class="stat-value expense">￥%s</div>
        </div>

        <div class="stat-card">
            <div class="stat-header">
                <div class="stat-icon icon-coins"></div>
                <h3>昨日收入</h3>
            </div>
            <div class="stat-value income">￥%s</div>
        </div>

        <div class="stat-card">
            <div class="stat-header">
                <div class="stat-icon icon-bill"></div>
                <h3>昨日支出</h3>
            </div>
            <div class="stat-value expense">￥%s</div>
        </div>

        <div class="stat-card">
            <div class="stat-header">
                <div class="stat-icon icon-calendar"></div>
                <h3>本月日均支出</h3>
            </div>
            <div class="stat-value average">￥%s</div>
        </div>

        <div class="stat-card">
            <div class="stat-header">
                <div class="stat-icon -icon-utensils"></div>
                <h3>日均饮食支出</h3>
            </div>
            <div class="stat-value average">￥%s</div>
        </div>

    </div>

    <div class="details-container">

        <br/>

        <div class="details-header">
            <div class="details-icon icon-receipt"></div>
            <h5>昨日收支明细</h5>
        </div>

        <ul class="transaction-list">%s
        </ul>

    </div>
</div>
</body>
</html>